package com.sh.rbac.domain.vo.job;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

/**
 * 任务视图对象
 *
 * @author wb
 * @since 2024-08-22
 */

@Data
@Schema(description = "任务视图对象")
public class JobVO {

    @Schema(description = "ID")
    private Long id;

    @Schema(description = "任务名称")
    private String jobName;

    @Schema(description = "任务组名")
    private String jobGroup;

    @Schema(description = "调用目标字符串")
    private String invokeTarget;

    @Schema(description = "cron执行表达式")
    private String cronExpression;

    @Schema(description = "cron计划策略;1-立即执行,2-执行一次,3-放弃执行")
    private Integer misfirePolicy;

    @Schema(description = "是否并发;0-允许,1-禁止")
    private Integer concurrent;

    @Schema(description = "下次执行时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date nextExecTime;

    @Schema(description = "状态;0-正常,1-停用")
    private Integer status;

    @Schema(description = "优先级")
    private Integer priority;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
}
